<template>
    <page-body>
        <view class="page">
            <view class="flex benben-position-layout flex flex-wrap align-center flex_0_ibhf" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
                <view class='flex flex-wrap align-center justify-between flex-sub fd0_0_ibhf'>
                    <view class='flex flex-wrap align-center fd0_0_c0_ibhf' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
                        <text class='fu-iconfont2  fd0_0_c0_c0_ibhf'>&#xE794;</text>
                    </view>
                    <view class='flex flex-wrap align-stretch justify-center'>
                        <text class='fd0_0_c1_c0_ibhf'>随堂测试</text>
                    </view>
                    <view class='flex flex-wrap align-center justify-end fd0_0_c0_ibhf'>
                    </view>
                </view>

            </view>
            <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="" v-if="type==1">
				<!---flex布局flex布局开始-->
				<view class="flex flex-direction flex-wrap align-center justify-center benben-flex-layout flex_1_ibhf">
				    <image class='fd1_0_ibhf' mode="aspectFit" :src='STATIC_URL+"stcimg/1.png"'></image>
				    <text class='fd1_1_ibhf'>{{infos.name}}</text>
				    <!-- <text class='fd1_2_ibhf'>{{infos.time}}</text> -->
					<text class="hui">发布时间：{{time}}</text>
					<text class="hui" v-if="time1">结束时间：{{time1}}</text>
				
				    <view class='flex  fd1_3_ibhf'></view>
				
				</view>
				
				<!---flex布局flex布局结束-->
				<!---flex布局2flex布局开始-->
				<view class="flex flex-wrap align-center justify-around benben-flex-layout flex_2_ibhf">
				    <view class='flex flex-direction align-center'>
				        <text class='fd2_0_c0_ibhf'>{{infos.correct}}</text>
				        <text class='fd2_0_c1_ibhf'>答对题数</text>
				    </view>
				    <view class='flex flex-direction align-center'>
				        <text class='fd2_0_c0_ibhf'>{{infos.error}}</text>
				        <text class='fd2_0_c1_ibhf'>答错题数</text>
				    </view>
				    <view class='flex flex-direction align-center'>
				        <text class='fd2_0_c0_ibhf'>{{infos.no_score_num}}</text>
				        <text class='fd2_0_c1_ibhf'>未计分题数</text>
				    </view>
				    <view class='flex flex-direction align-center'>
				        <text class='fd2_0_c0_ibhf'>{{infos.accuracy}}%</text>
				        <text class='fd2_0_c1_ibhf'>正确率</text>
				    </view>
				</view>
				
			</view>
			<view class="flex flex-direction flex-wrap align-center justify-center benben-flex-layout erro" v-if="type==2">
				<image class='qdjg_fd1_0_ibhf' mode="aspectFit" :src='STATIC_URL+"stcimg/12.png"'></image>
				<!-- <text class='qdjg_fd1_1_ibhf'>抢答失败</text> -->
				<text class='qdjg_fd1_1_ibhf'>随堂测已结束，下次要快一点哦！</text>
				<text class="hui">发布时间：{{time}}</text>
				<text class="hui">结束时间：{{time1}}</text>
				<view class='flex flex-direction flex-wrap align-center justify-center qdjg_fd1_3_ibhf' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
				    <text class='qdjg_fd1_3_c0_ibhf'>返回</text>
				</view>
			</view>
           
            <!---flex布局2flex布局结束-->
          <!--  <view class="flex flex-wrap align-center justify-center benben-position-layout flex flex_3_ibhf">
                <button class='fd3_0_ibhf' @tap.stop="handleJumpDiy" data-type="back" data-url="1" >返回课程</button>

            </view>
            <view :style="{height: '88rpx'}"></view> -->


        </view>
    </page-body>
</template>
<script>
    export default {
        components: {},


        data() {
            return {
				id:'',
				type:1,
				time:'',
				time1:'',
				infos:{
					accuracy:'',
					correct:'',
					error:'',
					time:'',
				}
			};
        },
        computed: {

        },
        watch: {},
        onLoad(options) {
			this.id=options.id
			this.time = options.time
			this.time1 = options.time1
			this.type = options.type
			if(this.type==1){
				this.getInfo()
			}
        },
        onUnload() {

        },
        onReady() {

        },
        onShow() {

        },
        onHide() {

        },
        onResize() {

        },
        onPullDownRefresh() {

        },
        onReachBottom(e) {

        },
        onPageScroll(e) {

        },
        methods: {
			async getInfo(){
				
				let res = await this.$api.post(global.apiUrls.post68d3b6f099523, {
					homeworkreleaserecord_id: this.id,
					
				});
				if (res.data.code != 1) {
					this.$message.info(datakclist.data.msg);
					return
				}
				this.infos=res.data.data
			}
        }	
    };
</script>
<style lang="scss" scoped>
    .page {
        width: 100vw;
        overflow-x: hidden;
        min-height: calc(100vh - var(--window-bottom));
        background: #ffffff;
        background-size: 100% auto;

        .flex_3_ibhf {
            width: 750rpx;
            height: 88rpx;
            overflow: hidden;
            z-index: 10;
            bottom: calc(88rpx + var(--window-bottom));

            .fd3_0_ibhf {
                border-radius: 12rpx;
                width: 702rpx;
                line-height: 84rpx;
                font-size: 36rpx;
                background: #145EFD;
                color: #fff;
                height: 84rpx;
            }
        }

        .flex_2_ibhf {
            padding: 0rpx 48rpx 0rpx 48rpx;
        }

        .fd2_0_c0_ibhf {
            font-weight: 700;
            font-size: 48rpx;
            line-height: 57rpx;
            margin: 0rpx 0rpx 24rpx 0rpx;
        }

        .fd2_0_c1_ibhf {
            font-size: 28rpx;
            color: rgba(102, 102, 102, 1);
        }

        .flex_1_ibhf {
            padding: 80rpx 50rpx 60rpx 50rpx;

            .fd1_0_ibhf {
                width: 492rpx;
                height: 310rpx;
                border-radius: 0rpx;
                margin: 0rpx 0rpx 30rpx 0rpx;
            }

            .fd1_1_ibhf {
				padding: 0 32rpx;
                font-size: 28rpx;
                color: #333;
                font-weight: 500;
                line-height: 46rpx;
				text-align: center;
				margin-bottom: 28rpx;
            }

            .fd1_2_ibhf {
                font-size: 24rpx;
                color: rgba(153, 153, 153, 1);
                margin: 16rpx 0rpx 44rpx 0rpx;
            }

            .fd1_3_ibhf {
                width: 100%;
                height: 1rpx;
                background: rgba(238, 238, 238, 1);
                margin: 10rpx 0rpx 10rpx 0rpx;
                transform: scaleY(0.5);
            }
        }

        .flex_0_ibhf {
            width: 750rpx;
            height: 88rpx;
            overflow: hidden;
            z-index: 10;
            top: 0rpx;
            background: #fff;
            background-size: 100% auto !important;

            .fd0_0_ibhf {
                padding: 0rpx 32rpx 0rpx 32rpx;

                .fd0_0_c1_c0_ibhf {
                    font-size: 36rpx;
                    font-weight: 700;
                    color: #333333;
                    line-height: 50rpx;
                }
            }
        }

        .fd0_0_c0_ibhf {
            width: 120rpx;

            .fd0_0_c0_c0_ibhf {
                font-size: 36rpx;
                color: #333;
            }
        }
    }
	.hui{
		color: #666666;
		margin-bottom: 16rpx;
	}
	.erro{
		.qdjg_fd1_0_ibhf {
		    width: 492rpx;
		    height: 310rpx;
		    border-radius: 0rpx;
		    margin: 283rpx 0rpx 30rpx 0rpx;
		}
		.qdjg_fd1_1_ibhf {
		    font-size: 32rpx;
		    color: rgba(51, 51, 51, 1);
			margin-bottom: 28rpx;
		}
		.qdjg_fd1_3_ibhf {
		    border: 2rpx solid #145EFD;
		    width: 304rpx;
		    height: 84rpx;
		    border-radius: 8rpx;
			margin-top: 78rpx;
		    .qdjg_fd1_3_c0_ibhf {
		        font-size: 36rpx;
		        color: rgba(20, 94, 253, 1);
		    }
		}
	}
</style>